package com.forum.module.system.controller.admin.auth.vo;

import io.swagger.v3.oas.annotations.media.Schema;

import java.time.LocalDateTime;

/**
 * @author zihan.ouyang
 */
@Schema(description = "管理后台 - 登录 Response VO")
public class AuthLoginRespVO {
    @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long userId;

    @Schema(description = "访问令牌", requiredMode = Schema.RequiredMode.REQUIRED, example = "dadsa")
    private String accessToken;

    @Schema(description = "刷新令牌", requiredMode = Schema.RequiredMode.REQUIRED, example = "dasda")
    private String refreshToken;

    @Schema(description = "过期时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1590731184000")
    private LocalDateTime expiresTime;

    public AuthLoginRespVO() {
    }

    public AuthLoginRespVO(Long userId, String accessToken, String refreshToken, LocalDateTime expiresTime) {
        this.userId = userId;
        this.accessToken = accessToken;
        this.refreshToken = refreshToken;
        this.expiresTime = expiresTime;
    }

    public Long getUserId() {
        return userId;
    }

    public AuthLoginRespVO setUserId(Long userId) {
        this.userId = userId;
        return this;
    }

    public String getAccessToken() {
        return accessToken;
    }

    public AuthLoginRespVO setAccessToken(String accessToken) {
        this.accessToken = accessToken;
        return this;
    }

    public String getRefreshToken() {
        return refreshToken;
    }

    public AuthLoginRespVO setRefreshToken(String refreshToken) {
        this.refreshToken = refreshToken;
        return this;
    }

    public LocalDateTime getExpiresTime() {
        return expiresTime;
    }

    public AuthLoginRespVO setExpiresTime(LocalDateTime expiresTime) {
        this.expiresTime = expiresTime;
        return this;
    }
}
